Method and device for gesture recognition

ABSTRACT

Embodiments of the application provide a method and a device for gesture recognition. The method includes: acquiring an image of a user; detecting whether the image includes a human face ( 2 ); and performing gesture recognition based on information of the detected human face ( 2 ), which comprises: dividing a first region ( 3 ) including the human face ( 2 ) in the image; dividing a plurality of detection regions (A 1 -A 4 ) outside the first region ( 3 ); determining respective priority levels of the plurality of detection regions (A 1 -A 4 ); and in an order from a high priority level to a low priority level, performing the gesture recognition in the plurality of detection regions (A 1 -A 4 ) in sequence.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to and the benefit of Chinese PatentApplication No. 201710701881.3 as filed on Aug. 16, 2017, the disclosureof which is incorporated herein in its entirety by reference.

TECHNICAL FIELD

The present application relates to a method and a device for gesturerecognition.

BACKGROUND

A smart equipment has spread to various aspects of our life. Oneemphasis in the smart equipment technologies is how to realizehuman-computer interaction more conveniently and effectively.Interaction using gesture has the merits of nature and convenience andcan be applied to many scenarios. For the sake of improving the accuracyof gesture recognition, it is often expected to use image sensors andprocessors that possess more powerful functions. This raises cost ofgesture recognition and does not necessarily improve the efficiency ofgesture recognition.

The method and the device for gesture recognition have space forimprovement.

SUMMARY

According to embodiments of the present application, there are provideda method and a device for gesture recognition.

In a first aspect of the application, there is provided a method forgesture recognition, comprising: acquiring an image of a user; detectingwhether the image includes a human face; and performing gesturerecognition based on information of the detected human face in responseto detecting that the image includes the human face. The performing ofthe gesture recognition based on the information of the detected humanface comprises: dividing a first region including the human face fromthe image; dividing another region except the first region into aplurality of detection regions; determining respective priority levelsof the plurality of detection regions; and performing sequentially thegesture recognition in the plurality of detection regions in an orderfrom a high priority level to a low priority level.

In an embodiment of the application, the plurality of detection regionsare divided according to a preset shape and size.

In an embodiment of the application, the dividing of the plurality ofdetection regions includes: detecting a continuous skin color zone inthe image; and dividing the plurality of detection regions so that atleast one of the detection regions include the continuous skin colorzone.

In an embodiment of the application, the determining of the respectivepriority levels of the plurality of detection regions comprises:determining the respective priority levels of the plurality of detectionregions according to an area of the continuous skin color zone containedin each of the detection regions.

In an embodiment of the application, the method for gesture recognitionfurther comprises altering a color of the first region to distinguishthe color of the first region from a skin color.

In an embodiment of the application, the determining of the respectivepriority levels of the plurality of detection regions comprises:determining the respective priority levels of the plurality of detectionregions according to a positional relationship between the plurality ofdetection regions and the first region.

In an embodiment of the application, the determining of the respectivepriority levels of the plurality of detection regions comprises:determining a priority level of a detection region on a left side or aright side of the first region as a first priority level; determining apriority level of a detection region below the first region as a secondpriority level lower than the first priority level; and determining apriority level of a detection region above the first region as a thirdpriority level lower than the second priority level.

In an embodiment of the application, the determining of the respectivepriority levels of the plurality of detection regions comprises:determining the respective priority levels of the plurality of detectionregions according to a user's use preference.

In an embodiment of the application, the performing of the gesturerecognition in the plurality of detection regions comprises: adjusting acolor range of a skin color according to a color of the human face; andperforming the gesture recognition in accordance with the color range ofthe skin color.

In an embodiment of the application, the adjusting of the color range ofthe skin color comprises: obtaining an average value of colors ofmultiple points of the human face, and adjusting the color range so thata center point of the color range is the average value.

In an embodiment of the application, the multiple points aresymmetrically distributed on left and right portions of the human face.

In an embodiment of the application, the method for gesture recognitionfurther comprises: storing information of the human face in response todetecting that the image includes the human face. As for user's imagesdetected within a predetermined time after the information of the humanface is stored, the gesture recognition is performed based on the storedinformation of the human face.

In an embodiment of the application, the method for gesture recognitionfurther comprises: performing the gesture recognition in the image inresponse to detecting that the image does not include the human face.

In a second aspect of the application, there is provided a device forgesture recognition, comprising a processor, a memory and an imagesensor. The processor executes programs stored in the memory to perform:acquiring an image of a user; detecting whether the image includes ahuman face; and performing gesture recognition based on information ofthe detected human face in response to detecting that the image includesthe human face. The performing of the gesture recognition based on theinformation of the detected human face comprises: dividing a firstregion including the human face from the image; dividing another regionexcept the first region into a plurality of detection regions;determining respective priority levels of the plurality of detectionregions; and performing sequentially the gesture recognition in theplurality of detection regions in an order from a high priority level toa low priority level.

In an embodiment of the application, the plurality of detection regionsare divided according to a preset shape and size.

In an embodiment of the application, the dividing of the plurality ofdetection regions includes: detecting a continuous skin color zone inthe image; and dividing the plurality of detection regions so that atleast one of the detection regions include the continuous skin colorzone.

In an embodiment of the application, the determining of the respectivepriority levels of the plurality of detection regions comprises:determining the respective priority levels of the plurality of detectionregions according to a positional relationship between the plurality ofdetection regions and the first region.

In an embodiment of the application, the determining of the respectivepriority levels of the plurality of detection regions comprises:determining the respective priority levels of the plurality of detectionregions according to a user's use preference.

In an embodiment of the application, the performing of the gesturerecognition in the plurality of detection regions comprises: adjusting acolor range of the skin color according to a color of the human face;and performing the gesture recognition in accordance with the colorrange of the skin color.

In an embodiment of the application, the processor also executes theprograms stored in the memory to perform a step of storing informationof the human face in response to detecting that the image includes thehuman face. As for user's images detected within a predetermined timeafter the information of the human face is stored, the gesturerecognition is performed based on the stored information of the humanface.

BRIEF DESCRIPTION OF THE DRAWINGS

To illustrate technical solutions in embodiments of the presentapplication more clearly, accompanied drawings of embodiments will bebriefly described below. It shall be known that, the accompanieddrawings described below are merely related to some embodiments of theapplication and are not construed as limiting of the presentapplication, wherein:

FIG. 1 is a schematic view showing an image acquired in a process ofgesture recognition;

FIG. 2 is a schematic flowchart showing a method for gesture recognitionprovided by an embodiment of the present application;

FIG. 3 is a schematic view showing that a human face is detected;

FIG. 4 is a schematic view showing division of a plurality of detectionregions in the acquired image;

FIG. 5 is another schematic view showing division of a plurality ofdetection regions in the acquired image;

FIG. 6 is a schematic view exemplarily showing detection of a continuousskin color zone;

FIG. 7 is a schematic view exemplarily showing adjustment of division ofthe plurality of detection regions according to the detection result ofthe continuous skin color zone;

FIG. 8 is a schematic view exemplarily showing division of the pluralityof detection regions according to the detection result of the continuousskin color zone;

FIG. 9 is a schematic view showing alteration of a color of the humanface in the acquired image;

FIG. 10 is a schematic view showing detection of the continuous skincolor zone on basis of FIG. 9;

FIG. 11 is a schematic view exemplarily showing acquisition of anaverage value of the skin color information of the human face;

FIG. 12 is a schematic view exemplarily showing gesture recognition ofmultiple users;

FIG. 13 is a block diagram exemplarily showing a device for gesturerecognition.

DETAILED DESCRIPTION

For the sake of making technical solutions and merits in embodiments ofthe present application more clearly, hereinafter, technical solutionsin embodiments of the present application will be clearly and fullydescribed in combination with the accompanied drawings. Apparently, theembodiments to be described are merely a part of embodiments of thepresent application, rather than all the embodiments. All otherembodiments, which are obtained by those skilled in the art on basis ofthe described embodiments of the present application without inventiveefforts, fall into the protection scope of the present application.

Regarding the method and the device for gesture recognition according toembodiments of the application, the information of the human face isutilized, and the gesture recognition can be performed more efficientlywithout increasing the hardware cost.

FIG. 1 is a schematic view showing an image acquired in the process ofgesture recognition. In the common application scenarios, a user makes agesture, and a smart equipment collects images regarding the gesture,and recognizes and analyzes the gesture to accomplish the human-computerinteraction. Generally, the smart equipment such as smart televisions,smart mobile phones and so on, will each collect images within arelatively large range to cover various zones where the user's handsmight appear. As shown in FIG. 1, a hand 1 and a face 2 of a user areoften collected simultaneously.

Skin colors of the hand 1 and the face 2 are similar. If the skin coloris used as a feature, the gesture recognition is directly performed onthe figure as shown in FIG. 1, the portion of the face 2 may produceinterference to the process of the gesture recognition, therebyincreasing a difficulty of the gesture recognition.

FIG. 2 is a schematic flowchart showing a method for gesture recognitionprovided by an embodiment of the present application. As shown in FIG.2, the method for gesture recognition includes: step S201: acquiring animage of a user; step S202: detecting whether the image includes a humanface; step S203: performing gesture recognition based on information ofthe detected human face in response to detecting that the image includesthe human face. The performing of the gesture recognition based on theinformation of the human face includes: dividing a first regionincluding the human face from the image; dividing another region exceptthe first region into a plurality of detection regions; determiningrespective priority levels of the plurality of detection regions; andperforming sequentially the gesture recognition in the plurality ofdetection regions in an order from a high priority level to a lowpriority level until a result of the gesture recognition is obtained.

Performing the gesture recognition in the plurality of detection regionsrefers to the specific process of detecting the shape of a hand. Afterthe human face is detected, detection of the shape of the hand isperformed respectively in areas where the hand might appear, which canreduce an amount of calculation and improve efficiency and degree ofaccuracy.

FIG. 3 is a schematic view showing that a human face is detected. Asshown in FIG. 3, in step S202, a human face is detected. Then, in stepS203, a first region 3 including the human face is divided. A shape anda size of the first region 3 can be set according to actualrequirements, and for example, it may be a rectangle slightly largerthan the detected human face so as to facilitate subsequent processing.In step S202, a human face detection can be performed using generalalgorithms provided by various program developing environments. Forexample, it is possible to use a human face detection module provided bythe OpenCV, the Android system or the IOS system, and it is possible touse, for example, an Adboost classifier based on Haar features.

FIG. 4 is a schematic view showing division of a plurality of detectionregions in the acquired image. As an example, in step S203, a pluralityof detection regions may be divided according to a preset shape andsize. As shown in FIG. 4, a plurality of detection regions are dividedaround the human face, wherein a first detection region A1 and a seconddetection region A2 are located at both sides of the human face, a thirddetection region A3 is located below the human face, and a fourthdetection region A4 is located above the human face. It should be notedthat the positional relationship as used herein such as “below”, “above”and so on is referred to with respect to the ground on which the personstands.

After division of the plurality of detection regions, it is possible toset respective priority levels of the plurality of detection regionsaccording to a positional relationship between the above plurality ofdetection regions and the first region. For example, the respectivepriority levels of the plurality of detection regions may be setcorresponding to habits of people using their hands, so that thepriority levels of detection regions at both sides of the human face aregreater than the priority level of a detection region below the humanface, and the priority level of the detection region below the humanface is higher than the priority level of a detection region above thehuman face. That is, it is possible to cause the priority levels of thefirst detection region A1 and the second detection region A2 to behigher than the priority level of the third detection region A3 andcause the priority level of the third detection region A3 to be higherthan the priority level of the fourth detection region A4. In this way,a detection region where the hand appears with a high possibility can bedetected preferentially. Once a gesture is detected in a detectionregion with a high priority level, the process of gesture recognitioncan be stopped so as to avoid unnecessary computation and improve theefficiency.

Further, considering that utilization rate of a right hand is relativelyhigher, as for regions on both sides of the human face, a regioncorresponding to the right hand can be set to be detectedpreferentially. That is, the priority level of the first detectionregion A1 can be caused to be higher than the priority level of thesecond detection region A2.

Heights of the first detection region A1 and the second detection regionA2 may be two to four times (e.g., three times) of height of the firstregion 3. Widths of the first detection region A1 and the seconddetection region A2 may be one to three times (e.g., two times) of widthof the first region 3.

FIG. 5 is another schematic view showing division of a plurality ofdetection regions in the acquired image. As shown in FIG. 5, outside theregions as shown in FIG. 4, a fifth detection region A5, a sixthdetection region A6, a seventh detection region A7 and so on may furtherbe divided on the periphery. In correspondence with the possibility ofappearing of the hand, the priority levels of the fifth detection regionA5, the sixth detection region A6 and the seventh detection region A7may be lower than that of the fourth detection region A4.

As shown in FIG. 4 and FIG. 5, the plurality of detection regions aredivided, and the respective priority levels of the plurality ofdetection regions are set. In this way, when an algorithm for gesturerecognition runs, only one detection region needs to be processed at atime, which can reduce an amount of computation significantly. Thereby,efficiency is improved and accuracy is enhanced.

In addition, it should be understood the division manners in FIG. 4 andFIG. 5 are merely exemplary, and in embodiments of the presentapplication, any number, any size or any shape of the regions can beused.

The priority level of each detection region is set according to apositional relationship between each of the detection regions and thehuman face in the acquired image, and then, in accordance with thepriority level of each of the detection regions, recognition isperformed respectively in each of the detection regions. By doing this,it is possible to avoid interference of the human face and reduce theamount of computation. Consequently, efficiency and degree of accuracyof the gesture recognition are enhanced.

In an embodiment of the application, the priority level of eachdetection region may also be set according to other parameters.

FIG. 6 is a schematic view exemplarily showing detection of a continuousskin color zone. As shown in FIG. 6, as an example, continuous skincolor zones (as indicated by shadowed portions in FIG. 6) are detectedin the first detection region A1, the second detection region A2 and thethird detection region A3, and moreover, an area of the continuous skincolor zone in the first detection region A1 is larger than that in thesecond detection region A2, and the area of the continuous skin colorzone in the second detection region A2 is larger than that in the thirddetection region A3. In the general application scenarios, a handportion (also possibly including a forearm portion connected thereto) isa body part with the continuous skin color that is most likely to bedetected near the face portion, and thus the priority level of eachdetection region can be set according to the area of the continuous skincolor zone in the detection region. In FIG. 6, it is possible to causethe priority level of the first detection region A1 to be higher thanthat of the second detection region A2, and the priority level of thesecond detection region A2 to be higher than that of the third detectionregion A3.

After the continuous skin color zones are detected, the respectivepriority levels of the plurality of detection regions are set, which canmake the process of gesture recognition more targeted. The resultobtained by the detection may be used for the process of gesturerecognition as well, and thus no additional amount of computation willbe added, either.

Various algorithms may be used for detection of the continuous skincolor zone, and embodiments of the present application are not limited.For example, an image segmentation may be performed firstly using apreset skin color model. The preset skin color model includes a presetcolor range of a skin color, and the preset color range of the skincolor may be expressed as (Cmin, Cmax). In a grayscale image, forexample, Cmin and Cmax can represent the minimum and the maximum ofgrayscale values, respectively. A pixel within the color range may belabeled as 1, and a pixel within the color range may be labeled as 0,thereby achieving the image segmentation (or called as binarization).

Then, it is detected whether the pixels labeled as 1 are continuous. Ifthere is another pixel labeled as 1 in surroundings of a pixel labeledas 1, these two pixels are continuous. Surroundings may refer to fourdirections of up, down, left and right, or may also refer to eightdirections of up, upper left, upper right, left, right, lower left,lower right and down. In this process, the number of pixels is summeddirectly, and thus the area can be obtained. In addition, in order tofurther improve the efficiency, we can consider setting a threshold forthe area of a continuous skin color zone. An area smaller than thethreshold may not be considered, and the threshold may be set to be50*50, for example.

The segmented image may also be directly used for the gesturerecognition. The process of the gesture recognition may adopt variousalgorithms as well, and embodiments of the present application are notlimited. For example, it is possible that based on the segmented image,a detection of the gesture is performed on basis of LBP features usingthe Adaboost classifier.

FIG. 7 is a schematic view exemplarily showing adjustment of division ofthe plurality of detection regions according to the detection result ofthe continuous skin color zone. In some cases, after the continuous skincolor zone is detected, it may be found that the continuous skin colorzone spans two or more regions. As shown in FIG. 7, the continuous skincolor zone spans the original first detection region A1 and the fourthdetection region A4. At this time, according to the distribution of thecontinuous skin color zone, the division of the plurality of detectionregions is adjusted so that any continuous skin color zone is located inany one of the plurality of detection regions. As shown in FIG. 7, it ispossible to adjust the division of the binarized regions according tothe distribution of the continuous skin color zone so that the adjustedfirst detection region A1′ comprises a complete continuous skin colorzone.

Adjusting the division of the plurality of detection regions can makethe process of gesture recognition more targeted. It shall be understoodthat there are no limits on the way of adjustment, as long as a completecontinuous skin color zone is contained by any one of the regions.

As mentioned above, the division of the plurality of detection regionsmay be performed statically, wherein the plurality of detection regionsare divided around the human face according to a predetermined numberand shape thereof, and the adjustment may be performed later. However,this is not a limitation of the application, and it shall be understoodthat, the division of the plurality of detection regions may also beperformed dynamically.

In an embodiment of the application, the division of the plurality ofdetection regions may include: detecting a continuous skin color zone inthe image; and dividing the plurality of detection regions so that atleast one of the detection regions include the continuous skin colorzone.

FIG. 8 is a schematic view exemplarily showing division of the pluralityof detection regions according to the detection result of the continuousskin color zone. Detecting the continuous skin color zone is an imageprocessing method used commonly. Therefore, the process may beconveniently performed after the human face is detected or while thehuman face is detected, and the continuous skin color zone outside thehuman face can be obtained. As shown in FIG. 8, in an embodiment of theapplication, a first detection region A1″ may be divided directlyaccording to the result of detection to contain the largest continuousskin color zone outside the human face and have the set highest prioritylevel. Similarly, a second detection region A2″ and a third detectionregion A3″ may be divided, and the priority level of the seconddetection region A2″ is caused to be higher than that of the thirddetection region A3″.

In an embodiment of the application, the division and the prioritysetting of the detection regions may be performed at the same timedirectly according to the detection result of the continuous skin colorzone. In the case that the position where the hand appears changesconstantly, such a scheme can be applied better.

As mentioned above, in the process of gesture recognition, the positioninformation of the human face can be sufficiently utilized to improvethe efficiency and the accuracy. Furthermore, the color information ofthe human face can be also utilized to facilitate the process of gesturerecognition.

FIG. 9 is a schematic view showing alteration of a color of the humanface in the acquired image. As shown in FIG. 9, the method for gesturerecognition may further include: altering a color of the first region todistinguish the color of the first region from a skin color. This stepmay be executed immediately after the first region is detected. Forexample, the human face portion may be set to be full white, full blackor any other color outside a skin color range, and preferably, the humanface portion may be set to a color that has a relatively big differencewith the skin color and background, such as full yellow, full green orthe like. In this way, it is possible to further prevent interference tothe process of dividing the plurality of detection regions and the like,and to prevent interference to the gesture recognition due to thecloseness of the skin color of the human face to the skin color of thehand.

FIG. 10 is a schematic view showing detection of the continuous skincolor zone on basis of FIG. 9. As shown in FIG. 10, after imagesegmentation (binarization), as compared with FIG. 8, a region of thehuman face portion can be removed. The interference of the human facecan be further prevented by performing gesture recognition on basis ofFIG. 10.

FIG. 11 is a schematic view exemplarily showing acquisition of anaverage value of the skin color information of the human face. Asmentioned above, a preset skin color model is used for the imagesegmentation. In an embodiment of the application, it is also possibleto adjust the preset skin color model, particularly to adjust a colorrange, according to a color of the human face. Specifically, theadjustment of the preset skin color model may include: obtaining anaverage value of colors of multiple points of the human face; andadjusting a color range so that a center point of the color range is theaverage value.

As an example, when the average value of the colors of the multiplepoints of the human face is obtained, the multiple points may besymmetrically distributed on left and right portions of the human face.As shown in FIG. 11, a center point O of a width of the human face in aleft-right direction is set, and a first range F1 and a second range F2are symmetric with respect to the center point O and lie in the samehorizontal line. The average value of the colors of all points in thefirst range F1 and the second range F2 is calculated and expressed asCv.

It shall be understood that, the positions and the shapes of the firstrange F1 and the second range F2 can each be set arbitrarily. As anexample, distances from centers of the first range F1 and the secondrange F2 to the center point O are made to be ¼ of a width of the humanface detection region 3, and the widths of the first range F1 and thesecond range F2 are ⅙ of the width of the human face detection region 3.In addition, the heights of the first range F1 and the second range F2may be ⅙ of the width of the human face detection region 3.

In a grayscale image, for example, a single value is used to representthe grayscale or the color, and in this case, the average value Cv maybe a single value. In a color image, for example, multiple values areused to represent the color. The average value Cv may contains multiplevalues, such as Rv, Gv and Bv values respectively representing red,green and blue in the RGB manner, U and V values in the YUV manner, Cband Cr values in the YCbCr, or the like.

In the following, an example will be given to describe how to adjust acolor range of the skin color according to the obtained average value Cvof the colors of the human face, wherein a single value is used torepresent the grayscale or the color. The preset color range of the skincolor may be (Cmin, Cmax), and a value of an original center point isCmid=(Cmin+Cmax)/2. If Cv<Cmid, the color range can be adjusted to be(Cmin, Cv+(Cv−Cmin)), and the value of the center point is Cv. IfCv>Cmid, the color range can be adjusted to be (Cv−(Cmax−Cv), Cmax), andthe value of the center point is Cv. If Cv=Cmix, it is not necessary toadjust.

It shall be understood that, when the multiple values are used torepresent the color, the above adjustments can be performed for eachvalue, and the specific process will not be described in detail.

In an embodiment of the application, after the acquisition of the imageof the human face, not only the position information of the human facecan be used to find the area where the hand may appear, but also thecolor information of the human face can be used to adjust a skin colormodel required by the gesture recognition. The degree of accuracy of thegesture recognition can be further improved.

In an embodiment of the application, the position information and thecolor information of the human face are sufficiently utilized so thatthe efficiency and the degree of accuracy of the gesture recognition canbe improved, which can also be applied to the gesture recognition ofmultiple users.

FIG. 12 is a schematic view exemplarily showing the gesture recognitionof multiple users. As shown in FIG. 12, taking two users as an example,a first user U1 operates with a right hand H1, and a second user U2operated with a right hand H2.

In accordance with the position information of the human faces, for thefirst user U1, the area where the right hand H1 is located may bedetected preferentially, and for the second user U2, the area where theright hand H2 is located may be detected preferentially. In this way,the correspondence relationship between the hand and the user can beobtained easily.

In addition, generally, colors of the face and the hand of the same userare closer. The face and the hand of the first user U1 belong to a firstcolor range, and the face and the hand of the second user U2 belong to asecond color range. Therefore, it is also easy to match the hand H1 withthe first user U1 and match the hand H2 with the second user U2 bycomparing the colors of the hand and the face.

In embodiments of the application, the priority level of each detectionregion may also be set by many other ways. For example, the prioritylevel of each detection region may be set according to a user'spreference. A user may be accustomed to operating with his left hand oroperate by holding a hand over his head. The user can set thesedetection regions to be the detection regions with the highest prioritylevel by himself. In addition, the smart equipment can alsoautomatically set, according to a history record, a detection region inwhich the gesture appears most often within a given time to be adetection region with the highest priority level.

In an embodiment of the application, considering that a motion frequencyof the human face is generally far less than that of the hand, after thehuman face is detected, the position information and the colorinformation of the image of the human face may be stored and directlyused for operation of multiple gesture recognitions. For example, takinga few seconds as one period, a face recognition is performed once duringeach period, and the position information, the color information and soon of the human face are stored. Then, during this period, for apredetermined number of images obtained later, the gesture recognitionis performed using the stored information of the human face. In thisway, the efficiency of the gesture recognition can be further enhancedwhile the degree of accuracy is improved.

In an embodiment of the application, when the human face is notdetected, the detection of the gesture is performed directly in theacquired image.

FIG. 13 is a block diagram exemplarily showing a device for gesturerecognition. As shown in FIG. 13, a device 1300 for gesture recognitionincludes a processor 1301, a memory 1302 and an image sensor 1303. Theprocessor 1300 executes programs stored in the memory to perform stepsof: acquiring an image of a user; detecting whether the image includes ahuman face; and in response to detecting that the image includes thehuman face, performing gesture recognition based on information of thedetected human face. Performing the gesture recognition based on theinformation of the human face includes: dividing a first regionincluding the human face in the image; dividing a plurality of detectionregions outside the first region; determining respective priority levelsof the plurality of detection regions; and in an order from a highpriority level to a low priority level, performing the gesturerecognition in the plurality of detection regions in sequence until aresult of the gesture recognition is obtained.

The device for gesture recognition may be any special or generalapparatus, and for example, the device for gesture recognition may be asmart mobile phone. The processor 1301 and the memory 1302 are anexisting processor and memory in the smart mobile phone, and the imagesensor 1303 is an existing imaging assembly in the smart mobile phone.

The methods for gesture recognition that have been described can each beexecuted by the device for gesture recognition as shown in FIG. 13.Therefore, at least the following technical solutions can be provided.

In the device for gesture recognition according to an embodiment of theapplication, a plurality of detection regions are divided according to apreset shape and size.

In the device for gesture recognition according to an embodiment of theapplication, the division of the plurality of detection regionsincludes: detecting a continuous skin color zone in the image; anddividing the plurality of detection regions so that at least one of thedetection regions include the continuous skin color zone.

In the device for gesture recognition according to an embodiment of theapplication, the determining of the respective priority levels of theplurality of detection regions comprises: determining the respectivepriority levels of the plurality of detection regions according to apositional relationship between the plurality of detection regions andthe first region.

In the device for gesture recognition according to an embodiment of theapplication, the determining of the respective priority levels of theplurality of detection regions comprises: determining the respectivepriority levels of the plurality of detection regions according to auser's use preference.

In the device for gesture recognition according to an embodiment of theapplication, the performing of the gesture recognition in the pluralityof detection regions includes: a color range of a skin color is adjustedaccording to a color of the human face; and performing the gesturerecognition in accordance with the color range of the skin color.

In the device for gesture recognition according to an embodiment of theapplication, the processor 1300 also executes the programs stored in thememory to perform a step of storing information of the human face inresponse to detecting that the image includes the human face. As forimages of the user detected within a predetermined time after theinformation of the human face is stored, the gesture recognition isperformed based on the stored information of the human face.

In the device for gesture recognition according to an embodiment of theapplication, the processor 1300 also executes the programs stored in thememory to perform a step of performing the gesture recognition in theimage in response to detecting that the image does not include the humanface.

As mentioned above, in the method for gesture recognition and the devicefor gesture recognition according to embodiments of the application, aprocess of detecting a human face is included, and after a position ofthe human face is obtained, the gesture recognition is preferentiallyperformed on a region in which the hand appears with a high possibility.After a color of the human face is acquired, a skin color model used forthe gesture recognition can also be updated dynamically. According toembodiments of the application, the efficiency and the degree ofaccuracy of the gesture recognition can be enhanced.

It can be understood that, the above embodiments are merely exemplaryembodiments adopted for explaining principle of the application, but theapplication is not limited thereto. Various modifications andimprovements can be made by those skilled in the art without departingfrom the spirit and essence of the application, and these modificationsand improvements are also deemed as the protection scope of theapplication.

What is claimed is:
 1. A method for gesture recognition, comprising:acquiring an image of a user; detecting whether the image includes ahuman face; and performing gesture recognition based on information ofthe human face in response to detecting that the image includes thehuman face; wherein the performing of the gesture recognition based onthe information of the human face comprises: dividing a first regionincluding the human face from the image; dividing another region exceptthe first region into a plurality of detection regions; determiningrespective priority levels of the plurality of detection regions; andperforming sequentially the gesture recognition in the plurality ofdetection regions in an order from a high priority level to a lowerpriority level.
 2. The method for gesture recognition of claim 1,wherein the plurality of detection regions are divided according to apreset shape and size.
 3. The method for gesture recognition of claim 1,wherein the dividing of the plurality of detection regions includes:detecting a continuous skin color zone in the image; and dividing theplurality of detection regions so that at least one of the detectionregions include the continuous skin color zone.
 4. The method forgesture recognition of claim 3, wherein the determining of therespective priority levels of the plurality of detection regionscomprises: determining the respective priority levels of the pluralityof detection regions according to an area of the continuous skin colorzone contained in each of the detection regions.
 5. The method forgesture recognition of claim 1, further comprising: altering a color ofthe first region to distinguish the color of the first region from askin color.
 6. The method for gesture recognition of claim 1, whereinthe determining of the respective priority levels of the plurality ofdetection regions comprises: determining the respective priority levelsof the plurality of detection regions according to a positionalrelationship between the plurality of detection regions and the firstregion.
 7. The method for gesture recognition of claim 6, wherein thedetermining of the respective priority levels of the plurality ofdetection regions comprises: determining a priority level of a detectionregion on a left side or a right side of the first region as a firstpriority level; determining a priority level of a detection region belowthe first region as a second priority level lower than the firstpriority level; and determining a priority level of a detection regionabove the first region as a third priority level lower than the secondpriority level.
 8. The method for gesture recognition of claim 1,wherein the determining of the respective priority levels of theplurality of detection regions comprises: determining the respectivepriority levels of the plurality of detection regions according to a usepreference of the user.
 9. The method for gesture recognition of claim1, wherein the performing of the gesture recognition in the plurality ofdetection regions comprises: adjusting a color range of a skin coloraccording to a color of the human face; and performing the gesturerecognition in accordance with the color range of the skin color. 10.The method for gesture recognition of claim 9, wherein the adjusting ofthe color range of the skin color comprises: obtaining an average valueof colors of multiple points of the human face, and adjusting the colorrange so that a center point of the color range is the average value.11. The method for gesture recognition of claim 1, further comprising:storing information of the human face in response to detecting that theimage includes the human face; wherein as for images of the userdetected within a predetermined time after the information of the humanface is stored, the gesture recognition is performed based on the storedinformation of the human face.
 12. A device for gesture recognition,comprising a processor, a memory and an image sensor; wherein theprocessor executes programs stored in the memory to perform: acquiringan image of a user; detecting whether the image includes a human face;and performing gesture recognition based on information of the humanface in response to detecting that the image includes the human face;wherein the performing of the gesture recognition based on theinformation of the human face comprises: dividing a first regionincluding the human face from the image; dividing another region exceptthe first region into a plurality of detection regions; determiningrespective priority levels of the plurality of detection regions; andperforming sequentially the gesture recognition in the plurality ofdetection regions in an order from a high priority level to a lowpriority level.
 13. The device for gesture recognition of claim 12,wherein the processor also executes the programs stored in the memory toperform a step of altering a color of the first region to distinguishthe color of the first region from a skin color.
 14. The device forgesture recognition of claim 12, wherein the determining of therespective priority levels of the plurality of detection regionscomprises: determining the respective priority levels of the pluralityof detection regions according to a positional relationship between theplurality of detection regions and the first region.
 15. The device forgesture recognition of claim 12, wherein the determining of therespective priority levels of the plurality of detection regionscomprises: determining the respective priority levels of the pluralityof detection regions according to a use preference of the user.
 16. Thedevice for gesture recognition of claim 12, wherein the performing ofthe gesture recognition in the plurality of detection regions comprises:adjusting a color range of a skin color according to a color of thehuman face; and performing the gesture recognition in accordance withthe color range of the skin color.